package demo_0326;

public class DrawApp {
    public static void main(String[] args) {
        // 定义一个数组，存储100个圆形
        Circle[] circles = new Circle[100];
        int count2 = 0;
        circles[count2++] = new Circle(10, 20, 30);
        circles[count2++] = new Circle(50, 60, 70);
        circles[count2++] = new Circle(90, 100, 110);
        circles[count2++] = new Circle(130, 140, 150);
        circles[count2++] = new Circle(170, 180, 190);
        circles[count2++] = new Circle(210, 220, 230);
        for (int i = 0; i < count2; i++) {
            circles[i].draw();
        }
        // 定义一个数组，存储100个矩形
        Rectangle[] rectangles = new Rectangle[100];
        int count1 = 0;
        rectangles[count1++] = new Rectangle(10, 20, 30, 40);
        rectangles[count1++] = new Rectangle(50, 60, 70, 80);
        rectangles[count1++] = new Rectangle(90, 100, 110, 120);
        rectangles[count1++] = new Rectangle(130, 140, 150, 160);
        rectangles[count1++] = new Rectangle(170, 180, 190, 200);
        rectangles[count1++] = new Rectangle(210, 220, 230, 240);
        for (int i = 0; i < count1; i++) {
            rectangles[i].draw();
        }
    }
}
